package com.ruoyi.statisticalCenter.controller;

import java.util.List;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.logistic.domain.PageInfo;
import com.ruoyi.statisticalCenter.domain.vo.ScWeightFlowDirectionDispositionVo;
import com.ruoyi.statisticalCenter.domain.vo.ScWeightFlowDirectionMonitoringVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.statisticalCenter.domain.ScWeightFlowDirectionMonitoring;
import com.ruoyi.statisticalCenter.service.IScWeightFlowDirectionMonitoringService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 均重流向监控Controller
 *
 * @author pyx
 * @date 2024-03-01
 */
@RestController
@RequestMapping("/sc/monitoring")
@Api(tags = "统计中心-均重流向监控")
public class ScWeightFlowDirectionMonitoringController extends BaseController
{
    @Autowired
    private IScWeightFlowDirectionMonitoringService scWeightFlowDirectionMonitoringService;

    /**
     * 查询均重流向监控列表
     */
    @PostMapping("/list")
    @ApiOperation("查询均重流向监控列表")
    public R list(@RequestBody ScWeightFlowDirectionMonitoringVo scWeightFlowDirectionMonitoringVo)
    {
        return scWeightFlowDirectionMonitoringService.collect(scWeightFlowDirectionMonitoringVo);
    }

    @PostMapping("/updateDisposition")
    @ApiOperation("修改均重流向配置参数")
    public R updateDisposition(@RequestBody ScWeightFlowDirectionDispositionVo scWeightFlowDirectionDispositionVo)
    {
        return scWeightFlowDirectionMonitoringService.updateDisposition(scWeightFlowDirectionDispositionVo);
    }

    @GetMapping("/selectDisposition")
    @ApiOperation("查询均重流向配置参数")
    public R selectDisposition()
    {
        return scWeightFlowDirectionMonitoringService.selectDisposition();
    }

}
